<?php
	include("inc_security.php");
   $ac_referer = $_SERVER['HTTP_REFERER'];
   if(strpos($ac_referer,'request_list') != false) {
      $dl_tab = 'request';
      $dl_field = 'req_id';
   }else {
      $dl_tab = 'contact';
      $dl_field = 'con_id';
   }
	$returnurl 		= base64_decode(getValue("returnurl","str","GET",base64_encode("listing.php")));
	$record_id		= getValue("record_id","str","POST","0");
	$arr_record 	= explode(",", $record_id);
	$total 			= 0;
	foreach($arr_record as $i=>$record_id){
		$record_id = intval($record_id);
		//Delete data with ID
		$db_del = new db_execute("DELETE FROM $dl_tab WHERE $dl_field IN(" . $record_id . ")");
      $total = $db_del->total;
	}
	echo "Có " . $total . " bản ghi đã được xóa !";
?>